$OpenBSD: patch-src_modules_rlm_sql_drivers_rules_mak,v 1.7 2014/07/17 00:20:51 sthen Exp $
--- src/modules/rlm_sql/drivers/rules.mak.orig	Mon Apr 28 20:13:08 2014
+++ src/modules/rlm_sql/drivers/rules.mak	Wed Jul  9 00:41:22 2014
@@ -101,9 +101,9 @@ build-module: $(TARGET).la
 	done
 
 $(TARGET).la: $(LT_OBJS)
-	$(LIBTOOL) --mode=link --tag=CC $(CC) -release $(RADIUSD_VERSION_STRING) \
+	$(LIBTOOL) --mode=link --tag=CC $(CC) -avoid-version \
 	-module $(LINK_MODE) $(LDFLAGS) $(RLM_SQL_LDFLAGS) -o $@ \
-	-rpath $(libdir) $^ $(RLM_SQL_LIBS)
+	-rpath $(libdir)/freeradius $^ $(RLM_SQL_LIBS)
 
 #######################################################################
 #
@@ -146,7 +146,5 @@ reconfig:
 install:
 	if [ "x$(TARGET)" != "x" ]; then \
 	    $(LIBTOOL) --mode=install $(INSTALL) -c \
-		$(TARGET).la $(R)$(libdir)/$(TARGET).la || exit $$?; \
-	    rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la; \
-	    ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la || exit $$?; \
+		$(TARGET).la $(R)$(libdir)/freeradius/$(TARGET).la || exit $$?; \
 	fi
